package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class PlanManage {
    private String id;

    private String planType;

    private String planCode;

    private String planStatus;

    private String completeTime;

    private String planName;

    private String itemTypeId;

    private String gradeValue;

    private String peieceNum;

    private String thNumber;

    private String totalNum;

    private String completeNum;
    private String completePercent;

    private String planUserId;

    private String planUserName;

    private Date createTime;

    private Date updateTime;

    private String status;

    private int count;

    private List<PlanOrder> planOrders;

    private double addCount= 0.0;

    public static final transient Map<String, String> STATUSMAP =
            ImmutableMap.of("1", "待生产", "2", "生产中","3", "已完成");

    public static final transient Map<String, String> PLANTYPEMAP =
            ImmutableMap.of("1", "订单", "2", "备货");

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getPlanTypeCn() {
        return PLANTYPEMAP.get(getPlanType());
    }
    public String getPlanType() {
        return planType;
    }

    public void setPlanType(String planType) {
        this.planType = planType == null ? null : planType.trim();
    }

    public String getPlanCode() {
        return planCode;
    }

    public void setPlanCode(String planCode) {
        this.planCode = planCode == null ? null : planCode.trim();
    }

    public String getPlanStatusCn() {
        return STATUSMAP.get(getPlanStatus());
    }
    public String getPlanStatus() {
        return planStatus;
    }

    public void setPlanStatus(String planStatus) {
        this.planStatus = planStatus == null ? null : planStatus.trim();
    }

    public String getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(String completeTime) {
        this.completeTime = completeTime == null ? null : completeTime.trim();
    }

    public String getPlanName() {
        return planName;
    }

    public void setPlanName(String planName) {
        this.planName = planName == null ? null : planName.trim();
    }

    public String getItemTypeId() {
        return itemTypeId;
    }

    public void setItemTypeId(String itemTypeId) {
        this.itemTypeId = itemTypeId == null ? null : itemTypeId.trim();
    }

    public String getGradeValue() {
        return gradeValue;
    }

    public void setGradeValue(String gradeValue) {
        this.gradeValue = gradeValue == null ? null : gradeValue.trim();
    }

    public String getPeieceNum() {
        return peieceNum;
    }

    public void setPeieceNum(String peieceNum) {
        this.peieceNum = peieceNum == null ? null : peieceNum.trim();
    }

    public String getThNumber() {
        return thNumber;
    }

    public void setThNumber(String thNumber) {
        this.thNumber = thNumber == null ? null : thNumber.trim();
    }

    public String getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(String totalNum) {
        this.totalNum = totalNum == null ? null : totalNum.trim();
    }

    public String getCompleteNum() {
        return completeNum;
    }

    public void setCompleteNum(String completeNum) {
        this.completeNum = completeNum == null ? null : completeNum.trim();
    }

    public String getPlanUserId() {
        return planUserId;
    }

    public void setPlanUserId(String planUserId) {
        this.planUserId = planUserId == null ? null : planUserId.trim();
    }

    public String getPlanUserName() {
        return planUserName;
    }

    public void setPlanUserName(String planUserName) {
        this.planUserName = planUserName == null ? null : planUserName.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public String getCompletePercent() {
        return completePercent;
    }

    public void setCompletePercent(String completePercent) {
        this.completePercent = completePercent;
    }


    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public List<PlanOrder> getPlanOrders() {
        return planOrders;
    }

    public void setPlanOrders(List<PlanOrder> planOrders) {
        this.planOrders = planOrders;
    }

    public double getAddCount() {
        return addCount;
    }

    public void setAddCount(double addCount) {
        this.addCount = addCount;
    }

    public String getCreateTimeFt(){
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }
}